import BackTop from "components/content/backTop/BackTop.vue"

export const BackTopMixin = {
    components: {
        BackTop
    },
    data () {
        return {
            isShowBackTop:false,
        }
    },
    methods: {
        /**
             * 回到顶部
             */
        gotoTop(){
            this.$refs.scroll.scrollTo(0,0,1000)
        },
        listenShowBT(position){
            this.isShowBackTop = -position.y>600
        }
    }
}